#include <stdio.h>
#include <stdlib.h>

/*
 * man 3 printf 
 * printf("%[修饰符]格式字符"，[输出表项]);
 * */


#define STRSIZE 32


int main(void)
{
	char ch = 65;
	
	printf("%d\n",ch);
	printf("%c\n",ch);
	

	printf("==========\n");




	int i = 123;

	float f = 123.456;
	
	char str[STRSIZE] = "HELLOWORLD";
	
	printf("%10d\n",i);
	printf("%10.9f\n",f);
	printf("%.5s\n",str);

	printf("str = %10.5s\n",str);
	printf("str = %-10.5s[over]\n",str);
	
	int key = 255;
	printf("key十进制：%d,八进制:%#o,十六进制：%#x\n",key,key,key);
	double dou = 234.567;
	printf("dou = %lf\n",dou);
	long lo = 132134124141;
	printf("lo = %ld\n",lo);
	




	/*
 	* printf(); 变参   
 	* 输出表项 与格式字符数目不符合 gcc 会警告并在栈的中找
 	* */
	printf("==========\n");
	printf("%d	%lf\n",i,dou);
	printf("%d	%lf	%ld\n",i,dou);
	printf("%d\n");
	
	exit(0);
}
